package com.xiaocg.factory.dd;

import com.xiaocg.factory.Coffee;

public class CoffeeTest2 {
    public static void main(String[] args) {
        CoffeeStore2 coffeeStore2 = new CoffeeStore2();
        CoffeeFactory coffeeFactory = new AmericanoCoffeeFactory();
        coffeeStore2.setCoffeeFactory(coffeeFactory);
        Coffee coffee = coffeeStore2.orderCoffee();
        System.out.println(coffee.getName());
    }
}
